using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class SkillDeployer : SingletonPattonMonoAutoBase<SkillDeployer>
{
   private SkillDeployer() { }
    public void ImpactTargets(SkillData skillData)
    {
        skillData.cdRemain = skillData.skillCd;
        skillData.Skill?.Invoke();
        CoolTimeDown(skillData);
    }
    private void CoolTimeDown(SkillData data)
    {
        data.SkillImage.fillAmount = 0;
        GameRoot.GetInstance().TimerManager_Root.StartTimer(data.skillCd, () => { data.cdRemain = 0; data.SkillImage.fillAmount = 1; }, () => { data.SkillImage.fillAmount += 0.02f/data.skillCd; });
    }
}
